<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>Document</title>
    <style>
        body{
            padding: 0;
            margin: 0;
        }
        @media screen and (device-width:320px){
            html{
                /* 分成20份 */
                font-size: 16px;
            }
        }
        @media screen and (device-width:360px){
            html{
                /* 分成20份 */
                font-size: 18px;
            }
        }
        @media screen and (device-width:375px){
            html{
                /* 分成20份 */
                font-size: 18.75px;
            }
        }
        @media screen and (device-width:414px){
            html{
                /* 分成20份 */
                font-size: 20.07px;
            }
        }
        div{
            width: 10rem;
            height: 10rem;
            border: 1px red solid;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>